package com.situ.boot.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "oreruning", schema = "brcc", catalog = "")
public class OreruningEntity {
    private long pid;
    private Long kid;
    private Timestamp starttime;
    private Timestamp stoptime;
    private String state;
    private Integer biernum;

    @Id
    @Column(name = "pid")
    public long getPid() {
        return pid;
    }

    public void setPid(long pid) {
        this.pid = pid;
    }

    @Basic
    @Column(name = "kid")
    public Long getKid() {
        return kid;
    }

    public void setKid(Long kid) {
        this.kid = kid;
    }

    @Basic
    @Column(name = "starttime")
    public Timestamp getStarttime() {
        return starttime;
    }

    public void setStarttime(Timestamp starttime) {
        this.starttime = starttime;
    }

    @Basic
    @Column(name = "stoptime")
    public Timestamp getStoptime() {
        return stoptime;
    }

    public void setStoptime(Timestamp stoptime) {
        this.stoptime = stoptime;
    }

    @Basic
    @Column(name = "state")
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Basic
    @Column(name = "biernum")
    public Integer getBiernum() {
        return biernum;
    }

    public void setBiernum(Integer biernum) {
        this.biernum = biernum;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OreruningEntity that = (OreruningEntity) o;
        return pid == that.pid &&
                Objects.equals(kid, that.kid) &&
                Objects.equals(starttime, that.starttime) &&
                Objects.equals(stoptime, that.stoptime) &&
                Objects.equals(state, that.state) &&
                Objects.equals(biernum, that.biernum);
    }

    @Override
    public int hashCode() {
        return Objects.hash(pid, kid, starttime, stoptime, state, biernum);
    }
}
